<template>
	
		<view :note="note" class="view1" @click="handleClick1(note.id)">
			
			<text class="p1">{{note.title}}</text><br>
			<text class="p2">{{short(note.description)}}</text><br>
			<text class="p3">{{note.createTime}}</text><br>
		</view>
</template>

<script>
	export default {
		props:{
			note:{
				type:Object,
				required:true
			},
		},
		methods:{
			short(text){
				return " "+text.substr(0,30)+' ....'
			},
			handleClick1(id){
				uni.navigateTo({
					url:'/pages/notes/note_id?id='+id
				})
			}
		},
		data() {
			return {
				
			};
		}
	}
</script>

<style scoped>
	.view1{
		font-weight: 200;
		font-size: 15px;
		background-color: white;
		padding: 10px 20px 20px 20px;
		margin: 10px 15px 10px 15px;
		border: #5CADFF solid 1px;
		border-radius: 20px;
	}
	.view1:hover{
		color: #007AFF;
	}
	.p1{
		font-size: 15px;
		font-weight: 200
	}
	.p2{
		font-size: 15px;
	}

	.p3{
		margin-top: 1%;
		line-height: 100%;
		float: right;
		font-size: 10px;
	}
</style>
